\(\int \frac {-1+x^2}{(1+x^2)^{3/2}} \, dx\) [108]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 15 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=-\frac {2 x}{\sqrt {1+x^2}}+\text {arcsinh}(x) \]

[Out]

arcsinh(x)-2*x/(x^2+1)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {393, 221} \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=\text {arcsinh}(x)-\frac {2 x}{\sqrt {x^2+1}} \]

[In]

Int[(-1 + x^2)/(1 + x^2)^(3/2),x]

[Out]

(-2*x)/Sqrt[1 + x^2] + ArcSinh[x]

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 393

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(-(b*c - a*d))*x*((a + b*x^n)^(p
 + 1)/(a*b*n*(p + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {2 x}{\sqrt {1+x^2}}+\int \frac {1}{\sqrt {1+x^2}} \, dx \\ & = -\frac {2 x}{\sqrt {1+x^2}}+\sinh ^{-1}(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.93 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=-\frac {2 x}{\sqrt {1+x^2}}-\log \left (-x+\sqrt {1+x^2}\right ) \]

[In]

Integrate[(-1 + x^2)/(1 + x^2)^(3/2),x]

[Out]

(-2*x)/Sqrt[1 + x^2] - Log[-x + Sqrt[1 + x^2]]

Maple [A] (verified)

Time = 2.38 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.93

method result size
default \(\operatorname {arcsinh}\left (x \right )-\frac {2 x}{\sqrt {x^{2}+1}}\) \(14\)
risch \(\operatorname {arcsinh}\left (x \right )-\frac {2 x}{\sqrt {x^{2}+1}}\) \(14\)
trager \(-\frac {2 x}{\sqrt {x^{2}+1}}+\ln \left (x +\sqrt {x^{2}+1}\right )\) \(22\)
meijerg \(-\frac {x}{\sqrt {x^{2}+1}}+\frac {-\frac {\sqrt {\pi }\, x}{\sqrt {x^{2}+1}}+\sqrt {\pi }\, \operatorname {arcsinh}\left (x \right )}{\sqrt {\pi }}\) \(36\)
pseudoelliptic \(\frac {-\ln \left (\frac {-x +\sqrt {x^{2}+1}}{x}\right ) \sqrt {x^{2}+1}+\ln \left (\frac {x +\sqrt {x^{2}+1}}{x}\right ) \sqrt {x^{2}+1}-4 x}{2 \sqrt {x^{2}+1}}\) \(61\)

[In]

int((x^2-1)/(x^2+1)^(3/2),x,method=_RETURNVERBOSE)

[Out]

arcsinh(x)-2*x/(x^2+1)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 44 vs. \(2 (13) = 26\).

Time = 0.27 (sec) , antiderivative size = 44, normalized size of antiderivative = 2.93 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=-\frac {2 \, x^{2} + {\left (x^{2} + 1\right )} \log \left (-x + \sqrt {x^{2} + 1}\right ) + 2 \, \sqrt {x^{2} + 1} x + 2}{x^{2} + 1} \]

[In]

integrate((x^2-1)/(x^2+1)^(3/2),x, algorithm="fricas")

[Out]

-(2*x^2 + (x^2 + 1)*log(-x + sqrt(x^2 + 1)) + 2*sqrt(x^2 + 1)*x + 2)/(x^2 + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (14) = 28\).

Time = 2.08 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.07 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=\frac {x^{2} \operatorname {asinh}{\left (x \right )}}{x^{2} + 1} - \frac {2 x}{\sqrt {x^{2} + 1}} + \frac {\operatorname {asinh}{\left (x \right )}}{x^{2} + 1} \]

[In]

integrate((x**2-1)/(x**2+1)**(3/2),x)

[Out]

x**2*asinh(x)/(x**2 + 1) - 2*x/sqrt(x**2 + 1) + asinh(x)/(x**2 + 1)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=-\frac {2 \, x}{\sqrt {x^{2} + 1}} + \operatorname {arsinh}\left (x\right ) \]

[In]

integrate((x^2-1)/(x^2+1)^(3/2),x, algorithm="maxima")

[Out]

-2*x/sqrt(x^2 + 1) + arcsinh(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.67 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=-\frac {2 \, x}{\sqrt {x^{2} + 1}} - \log \left (-x + \sqrt {x^{2} + 1}\right ) \]

[In]

integrate((x^2-1)/(x^2+1)^(3/2),x, algorithm="giac")

[Out]

-2*x/sqrt(x^2 + 1) - log(-x + sqrt(x^2 + 1))

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.80 \[ \int \frac {-1+x^2}{\left (1+x^2\right )^{3/2}} \, dx=\frac {\mathrm {asinh}\left (x\right )+x^2\,\mathrm {asinh}\left (x\right )-2\,x\,\sqrt {x^2+1}}{x^2+1} \]

[In]

int((x^2 - 1)/(x^2 + 1)^(3/2),x)

[Out]

(asinh(x) + x^2*asinh(x) - 2*x*(x^2 + 1)^(1/2))/(x^2 + 1)